package com.mowh.gof23.behavioral.patterns.memento.game;

import java.util.ArrayList;
import java.util.List;

/**
 * @author mowh1gd
 * @create 2023/10/26 10:40
 */
public class Memento {
    int money; //package field
    ArrayList fruits; //package field

    Memento(int money) { //package constructor method
        this.money = money;
        this.fruits = new ArrayList();
    }

    void addFruit(String fruit) { //package method
        fruits.add(fruit);
    }

    public int getMoney() {
        return money;
    }

    List getFruits() { //package method
        return (List) fruits.clone();
    }
}
